/*自定义轮播图片类，需要图片名称  图片标题  图片连接*/
var scrollImgs = new Array();//准备数组
function ScrollImg(name,title,links){
  this.name = name;
  this.title = title;
  this.links = links;
}

$(document).ready(function(){
    initScrolls();
    $(".shutter-img").html("");
    $(scrollImgs).each(function(i,scrollImg){
        $(".shutter-img").append('<a href="'+scrollImg.links+'" data-shutter-title="'+scrollImg.title+'"><img src="../images/scroll/'+scrollImg.name+'" alt="#"></a>');
    });
    $(".shutter-desc > p").text($(".shutter-img > a").attr("data-shutter-title"));

});




function initScrolls(){
    scrollImgs.push(new ScrollImg("活力信工.jpg","活力信工","#"));
    scrollImgs.push(new ScrollImg("党.jpg","我心向党","#"));
    scrollImgs.push(new ScrollImg("校园掠影.jpg","校园掠影","#"));
    scrollImgs.push(new ScrollImg("大雪.jpg","立春","#"));
}
